package o;

import android.os.Handler;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant.KeyAndValue;
import o.der.f;

public class emb implements AccountBussinessListener {
    private final Handler ˊ = new Handler();
    private eks ˋ = new eks();
    private int ˎ;
    private a ˏ = a.APPGALLERY;
    private elx ॱ;

    public enum a {
        GAMECENTER,
        APPGALLERY
    }

    public emb(int i, a aVar) {
        this.ˎ = i;
        this.ˏ = aVar;
    }

    public void onAccountBusinessResult(ccp o_ccp) {
        if (o_ccp.ˎ == 102) {
            Logger.ˎ("PersonalAccountObserver", "login success. ");
            ˏ();
        } else if (o_ccp.ˎ == 103) {
            Logger.ˎ("PersonalAccountObserver", "log out success. ");
            ˎ();
        }
    }

    private void ˎ() {
        ((eke) cdb.ॱ(eke.class)).ˋ();
        this.ˊ.post(new Runnable(this) {
            final /* synthetic */ emb ˋ;

            {
                this.ˋ = r1;
            }

            public void run() {
                if (this.ˋ.ॱ != null) {
                    this.ˋ.ॱ.ˑॱ();
                }
            }
        });
    }

    private void ˏ() {
        if (ekg.ॱ().ˊ() == null) {
            this.ˋ.ˋ(this.ˎ);
        }
        if (this.ˏ.equals(a.APPGALLERY)) {
            eko.ˊ(f.ˑ, KeyAndValue.NUMBER_01);
        } else {
            eko.ˊ(f.ॱʽ, KeyAndValue.NUMBER_01);
        }
    }

    public void ˊ(elx o_elx) {
        this.ॱ = o_elx;
    }
}
